package com.atguigu.gmall.web;

import com.atguigu.gmall.common.exception.EnableAutoExceptionHandle;
import com.atguigu.gmall.common.interceptors.annotation.EnableUserAuthFeignInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @author:ahang
 * @create:2022-10-03 19:14
 * @Description:
 */
//common-util中有mybatis-plus,需要排除数据源的自动配置
    @EnableUserAuthFeignInterceptor //开启调用远程的拦截器,获取用户id
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableAutoExceptionHandle //开启自动异常处理
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.atguigu.gmall.feign") //开启远程调用
public class WebMainApplication {
    public static void main(String[] args) {
        SpringApplication.run(WebMainApplication.class,args);
    }
}
